[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
bcd() Convert Number to Binary Coded Decimal
include <bcd.h>
bcd bcd(x); or bcd(x, decimals);
int x; double x;
double x; int decimals;
The bcd() function converts a number to binary-coded decimal form.
-------------------------------- Example ---------------------------------
#include <iostream.h>
#include <bcd.h>
double x = 12345.678
bcd a = bcd(x/9,2); // one ninth of x, rounded to two places
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson